<table width="100%"><tr><td width="20%">
<a href="../index.html">&lt; index</a><br />
<a href="index.html">&lt; 12. Field of view toolkit</a><br />
<a href="fov_compute.html">&lt; 12.2 Computing the field of view</a>
</td><td width="60%">
<p align="center">
=====================================<br />
12.3 Reading fov information<br />
=====================================<br />
</p></td><td width="20%">
<a href="fov_delete.html">&gt; 12.4 Destroying a map</a>
</td></tr></table>
<style type="text/css">
.code { color:#444444; background-color:#EEEEEE;}
pre { color:#444444; background-color:#EEEEEE;}
table.param td { border : 1px solid #000000; }
th { background-color: #44BBFF; color: #FFFFFF }
table.none td { border : 0 }
</style>
Once your computed the field of view, you can know if a cell is visible with :<br />
<p class="code"><pre>
C++ : bool TCODMap::isInFov(int x, int y) const
C   : bool TCOD_map_is_in_fov(TCOD_map_t map, int x, int y)
Py  : map_is_in_fov(map, x, y)
</pre></p>
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>map</td><td>In the C version, the map handler returned by the TCOD_map_new function.</td></tr>
<tr><td>x,y</td><td>Coordinates of the cell we want to check.<br />0 &lt;= x &lt; map width.<br />0 &lt;= y &lt; map height.</td></tr>
</table>
<br />
Example :<br />
<p class="code"><pre>
C++ : TCODMap *map = new TCODMap(50,50); // allocate the map
      map->setProperties(10,10,true,true); // set a cell as 'empty'
      map->computeFov(10,10); // calculate fov from the cell 10x10
	  bool visible=map->isInFov(10,10); // is the cell 10x10 visible ?      
C   : TCOD_map_t map = TCOD_map_new(50,50);
      TCOD_map_set_properties(map,10,10,true,true);
      TCOD_map_compute_fov(map,10,10);
      bool visible = TCOD_map_is_in_fov(map,10,10);
Py  : map = libtcod.map_new(50,50)
      libtcod.map_set_properties(map,10,10,True,True)
      libtcod.map_compute_fov(map,10,10)
      visible = libtcod.map_is_in_fov(map,10,10)
</pre></p>You can also retrieve transparent/walkable informations with :<br />
<p class="code"><pre>
C++ : bool TCODMap::isTransparent(int x, int y) const
      bool TCODMap::isWalkable(int x, int y) const
C   : bool TCOD_map_is_transparent(TCOD_map_t map, int x, int y)
      bool TCOD_map_is_walkable(TCOD_map_t map, int x, int y)
Py  : map_is_transparent(map, x, y)
      map_is_walkable(map, x, y)
</pre></p>
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>map</td><td>In the C version, the map handler returned by the TCOD_map_new function.</td></tr>
<tr><td>x,y</td><td>Coordinates of the cell we want to check.<br />0 &lt;= x &lt; map width.<br />0 &lt;= y &lt; map height.</td></tr>
</table>

